package servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import entity.Product_Comment;
import service.ShowLeaveMessageService;
import service.impl.ShowLeaveMessageServiceImpl;

public class ShowLeaveMessageServlet extends HttpServlet {
	private ShowLeaveMessageService sms=new ShowLeaveMessageServiceImpl();
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		response.setContentType("text/html;charset=utf-8");
		//从数据库取值
		List<Product_Comment> product_Comment = sms.getAllWithoutList();
		request.setAttribute("product_Comment", product_Comment);
		request.getRequestDispatcher("liuyan.jsp").forward(request,response);
		
	}

	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
